<?php

/**
 * Created by PhpStorm.
 * User: evan
 * Date: 2017/9/22
 * Time: 上午9:19
 */
class Even_wheat extends MY_Api_Controller
{
    public function index()
    {
        $uid   = (int)$this->uid;
        $ds_id = (int)$this->input->get_post('ds_id');
        $type  = (int)$this->input->get_post('type');


        $this->load->service('direct_seeding/service_direct_seeding_even_wheat');
        $data = $this->service_direct_seeding_even_wheat->index($uid, $ds_id, $type);


        $this->json_output($data['data'], $data['status']);
    }


    public function confirm()
    {
        $uid    = (int)$this->uid;
        $by_uid = (int)$this->input->get_post('by_uid');
        $ds_id  = (int)$this->input->get_post('ds_id');
        $type   = (int)$this->input->get_post('type');


        $this->load->service('direct_seeding/service_direct_seeding_even_wheat');
        $data = $this->service_direct_seeding_even_wheat->confirm($uid, $by_uid, $ds_id, $type);


        $this->json_output($data['data'], $data['status']);
    }


    public function under()
    {
        $uid   = (int)$this->uid;
        $ds_id = (int)$this->input->get_post('ds_id');


        $this->load->service('direct_seeding/service_direct_seeding_even_wheat');
        $data = $this->service_direct_seeding_even_wheat->under($uid, $ds_id);


        $this->json_output($data['data'], $data['status']);
    }
}